import Vue from 'vue'
import Router from 'vue-router'
//import detailInfo from '@/pages/detailInfo/detailInfo'

const demo = r => require.ensure([], () => r(require('@/pages/demo')), 'demo')
const binding = r => require.ensure([], () => r(require('@/pages/binding')), 'binding')
const searchSchool = r => require.ensure([], () => r(require('@/pages/searchSchool')), 'searchSchool')
const vip_searchSchool = r => require.ensure([], () => r(require('@/pages/vip_searchSchool')), 'vip_searchSchool')
const schoolList = r => require.ensure([], () => r(require('@/pages/schoolList')), 'schoolList')
const vip_schoolList = r => require.ensure([], () => r(require('@/pages/vip_schoolList')), 'vip_schoolList')
const selectPage = r => require.ensure([], () => r(require('@/pages/selectPage')), 'selectPage')
const vip_selectPage = r => require.ensure([], () => r(require('@/pages/vip_selectPage')), 'vip_selectPage')
const vip_schoolPage = r => require.ensure([], () => r(require('@/pages/vip_schoolPage')), 'vip_schoolPage')
const getVip = r => require.ensure([], () => r(require('@/pages/getVip')), 'getVip')
const vip_selectProfession = r => require.ensure([], () => r(require('@/pages/vip_selectProfession')), 'vip_selectProfession')
const vip_professionTypePage = r => require.ensure([], () => r(require('@/pages/vip_professionTypePage')), 'vip_professionTypePage')
const vip_professionPage = r => require.ensure([], () => r(require('@/pages/vip_professionPage')), 'vip_professionPage')
const evaluation = r => require.ensure([], () => r(require('@/pages/evaluation')), 'evaluation')
Vue.use(Router)

//let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
//
//let indexAuto=null
//if(flag){
//	indexAuto=index
//}else{
//	indexAuto=indexPC
//}

var routes = [
		{
		path: '/evaluation',
		name: 'evaluation',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: evaluation
	},
	
	{
		path: '/vip_professionPage',
		name: 'vip_professionPage',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_professionPage
	},
	{
		path: '/vip_professionTypePage',
		name: 'vip_professionTypePage',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_professionTypePage
	}, {
		path: '/vip_selectProfession',
		name: 'vip_selectProfession',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_selectProfession
	}, {
		path: '/demo',
		name: 'demo',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: demo
	},
	{
		path: '/binding',
		name: 'binding',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: binding
	},
	{
		path: '/searchSchool',
		name: 'searchSchool',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: searchSchool
	},
	{
		path: '/vip_searchSchool',
		name: 'vip_searchSchool',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_searchSchool
	},
	{
		path: '/schoolList',
		name: 'schoolList',
		meta: {
			requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: schoolList
	},
	{
		path: '/vip_schoolList',
		name: 'vip_schoolList',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_schoolList
	},
	{
		path: '/selectPage',
		name: 'selectPage',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: selectPage
	},
	{
		path: '/vip_selectPage',
		name: 'vip_selectPage',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_selectPage
	},
	{
		path: '/vip_schoolPage',
		name: 'vip_schoolPage',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: vip_schoolPage
	},
	{
		path: '/getVip',
		name: 'getVip',
		meta: {
			requireAuth: false, // 添加该字段，表示进入这个路由是需要登录的
		},
		component: getVip
	},
];

let router = new Router({
	routes: routes
})

export default router